﻿using NUnit.Framework;

namespace SpellChecker.Tests
{
  [TestFixture]
  public class TestSpellCheckerOneWord
  {
    [Test]
    public void CorrectWordWithoutPunctationMarks()
    {
      var result = SpellChecker.HasSpellingErrors("Hallo");
      Assert.That(result, Is.EqualTo(false));
    }

    [Test]
    public void CorrectWordWithSemicolonAtEnd()
    {
      var result = SpellChecker.HasSpellingErrors("Hallo;");
      Assert.That(result, Is.EqualTo(false));
    }

    [Test]
    public void CorrectWordWithCommaAtEnd()
    {
      var result = SpellChecker.HasSpellingErrors("Hallo,");
      Assert.That(result, Is.EqualTo(false));
    }

    [Test]
    public void CorrectWordWithApostropheAtBegin()
    {
      var result = SpellChecker.HasSpellingErrors("'Hallo");
      Assert.That(result, Is.EqualTo(false));
    }

    [Test]
    public void CorrectWordWithCaseSensitive()
    {
      var result = SpellChecker.HasSpellingErrors("hallo");
      Assert.That(result, Is.EqualTo(false));
    }

    [Test]
    public void IncorrectAtEnd()
    {
      var result = SpellChecker.HasSpellingErrors("Hallo1");
      Assert.That(result, Is.EqualTo(false));
    }

    [Test]
    public void IncorrectWordAtBegin()
    {
      var result = SpellChecker.HasSpellingErrors("äHallo");
      Assert.That(result, Is.EqualTo(false));
    }

    [Test]
    public void IncorrectWordInTheMiddle()
    {
      var result = SpellChecker.HasSpellingErrors("Haello");
      Assert.That(result, Is.EqualTo(false));
    }

  }
}
